import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../components/HomeView.vue'
import AboutView from '../views/AboutView.vue'
import Layout from '../layout/Layout.vue'
import LoginView from '../views/LoginView.vue'
import RegisterView from '../views/RegisterView.vue'
import YuanPoetryView from '../views/YuanPoetryView.vue'
import SongPoetryView from '../views/SongPoetryView.vue'
import TangPoetryView from '../views/TangPoetryView.vue'
import ForeignPoetryView from '../views/ForeignPoetryView.vue'
import ChatView from '../views/ChatView.vue';
import ForumView from '../views/ForumView.vue';
import AIPoetryInteractionView from '../views/AIPoetryInteractionView.vue';
import NewPoetryView from '../views/NewPoetryView.vue'
import PoetrySearch from '../views/poem/PoetrySearch.vue'

const routes = [

  {
    path: '/ai-poetry-interaction',
    component: AIPoetryInteractionView
  },
  {
    path: '/',
    component: Layout,
    children: [
      {
        path: '',
        component: HomeView
      },  
  {
    path: '/ai-poetry-interaction',
    component: AIPoetryInteractionView
  },

    
  {
    path: '/ai-poetry-interaction',
    component: AIPoetryInteractionView
  },
  {
        path: 'about',
        component: AboutView
      },
    
  {
    path: '/ai-poetry-interaction',
    component: AIPoetryInteractionView
  },
  {
        path: 'login',
        component: LoginView
      },
    
  {
    path: '/ai-poetry-interaction',
    component: AIPoetryInteractionView
  },
  {
        path: 'register',
        component: RegisterView
      },
    
  {
    path: '/ai-poetry-interaction',
    component: AIPoetryInteractionView
  },
  {
        path: 'yuan-poetry',
        component: YuanPoetryView
      },
    
  {
    path: '/ai-poetry-interaction',
    component: AIPoetryInteractionView
  },
  {
        path: 'song-poetry',
        component: SongPoetryView
      },
    
  {
    path: '/ai-poetry-interaction',
    component: AIPoetryInteractionView
  },
  {
        path: 'tang-poetry',
        component: TangPoetryView
      },
    
  {
    path: '/ai-poetry-interaction',
    component: AIPoetryInteractionView
  },
  {
        path: 'foreign-poetry',
        component: ForeignPoetryView
      },
    
  {
    path: '/ai-poetry-interaction',
    component: AIPoetryInteractionView
  },
  {
        path: 'new-poetry',
        component: NewPoetryView
      },
    
  {
    path: '/ai-poetry-interaction',
    component: AIPoetryInteractionView
  },
  {
        path: '/chat',
        name: 'ChatView',
        component: ChatView
      },
      {
        path: 'modern-poetry',
        component: NewPoetryView
      },
      { path: '/forum', component: ForumView },
  { path: '/poetry-search', component: PoetrySearch },
    ]
  }
]

const router = createRouter({
  history: createWebHistory('/poem/'),  //添加了
  routes
})

export default router